package com.dx.as.upload;

import java.util.Map;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * Created by jwaoo on 2017/7/10.
 */

public interface FileOptionSevice {
    @Streaming
    @GET
    Call<ResponseBody> downloadFile(@Url String fileUrl);

    @Multipart
    @POST()
    Call<ResponseBody> upload(
            @Url String url,
            @QueryMap Map<String,Object> map,
            @Part MultipartBody.Part file
    );
}
